<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@page import="java.util.List"%>
<%@page import="com.house.java.model.News" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/style.css" />
	</head>
	<body>
		<div id="wrap">
			<div id="top_content">
				<div id="header">
					<div id="rightheader">
						
					</div>
					<div id="topheader">
						<h1 id="title">
							&nbsp;
							<a href="#">News</a> house
						</h1>
					</div>
				</div>
				<div id="content">
					<p id="whereami">
					</p>
					<h1 align="center">
						News List:
					</h1>
					<p>
						&nbsp;
					</p>

					<table class="table">
						<tr class="table_header">
							<td width="5%">
								ID
							</td>
							<td width="19%">
								Title
							</td>
							<td width="19%">
								Author
							</td>
							<td width="19%">
								Source
							</td>
							<td width="19%">
								Digest
							</td>
							<td width="19%">
								Body
							</td>
						</tr>
						<%
							List<News> houses = (List) request.getAttribute("news");
							for (int i = 0; i < houses.size(); i++) {
								News news = houses.get(i);
						%>
						<tr class='row<%=i%2+1 %>'>
							<td>
								<%=news.getId() %>
							</td>
							<td>
								<%=news.getTitle() %>
							</td>
							<td>
								<%=news.getAuthor() %>
							</td>
							<td>
								<%=news.getSource() %>
							</td>
							<td>
								<%=news.getDigest() %>
							</td>
							<td>
								<%=news.getBody() %>%
							</td>
							
						</tr>
						<%
							}
						%>

					</table>
					<br />
				</div>
			</div>
			<div id="footer">
				<div id="footer_bg">
					www.souhouse.com
				</div>
			</div>
		</div>
	</body>
</html>
